<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title></title>
</head>
<body>
  <div id="app"></div>
  <script src="js/vue.js"></script>
  <script>
    const app = Vue.createApp({
      setup(props, context){
         // this.deal();
         return {
           msg: 'itLike.com',
           log: ()=>{
              alert('点我干嘛?');
           }
         }
      },
      methods:{
          deal(){
            // alert('触发了');
            console.log(this.$options.setup());
          }
      },
      template: `
        <div>
           <h1>{{ msg }}</h1>
          <button @click="log">点我</button>
          <button @click="deal">处理</button>
        </div>
      `
    }).mount('#app');
  </script>
</body>
</html>
